package cn.edu.xmu.oomall.order.model.vo;

import cn.edu.xmu.oomall.order.constant.Constants;
import cn.edu.xmu.oomall.order.microservice.vo.ShopVo;
import cn.edu.xmu.oomall.order.microservice.vo.UserVo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 订单的完整信息
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
public class OrderInfoRetVo {
    @ApiModelProperty(value = "订单id")
    private Long id;
    @ApiModelProperty(value = "订单序号")
    private String orderSn;
    @ApiModelProperty(value = "买家")
    private UserVo customer;
    @ApiModelProperty(value = "店铺")
    private ShopVo shop;
    @ApiModelProperty(value = "母单id")
    private Long pid;
    @ApiModelProperty(value = "订单状态")
    private Integer state;
    @ApiModelProperty(value = "订单创建时间")
    @JsonFormat(pattern = Constants.DATE_TIME_FORMAT, timezone = "GMT+8")
    private LocalDateTime gmtCreate;
    @ApiModelProperty(value = "订单商品优惠前价格")
    private Long originPrice;
    @ApiModelProperty(value = "订单折扣金额")
    private Long discountPrice;
    @ApiModelProperty(value = "运费")
    private Long expressFee;
    @ApiModelProperty(value = "支付的点数")
    private Long point;
    @ApiModelProperty(value = "附言")
    private String message;
    @ApiModelProperty(value = "收货地区")
    private Long regionId;
    @ApiModelProperty(value = "详细地址")
    private String address;
    @ApiModelProperty(value = "电话")
    private String mobile;
    @ApiModelProperty(value = "收货人")
    private String consignee;
    @ApiModelProperty(value = "团购活动id")
    private Long grouponId;
    @ApiModelProperty(value = "预售活动id")
    private Long advancesaleId;
    @ApiModelProperty(value = "快递单号")
    private String shipmentSn;
    @ApiModelProperty(value = "所有订单内容物的完整信息")
    private List<OrderItemSimpleVo> orderItem;
}
